<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="<%= asset_path('favicon.ico') -%>">
    <meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" />
    <link rel="alternate" type="application/atom+xml" title="<%= t :site_title -%>" href="/action.atom" />

    <title><%= page_title -%></title>
    <% unless params.include? "no_css" %>
      <%= stylesheet_link_tag "application", media: "all" %>
    <% end %>
    <%= yield(:head) if content_for?(:head) -%>
    <%= csrf_meta_tags %>

    <script type="text/javascript">
      // Remove the no-js class from <html> if js is loading
      document.documentElement.className = document.documentElement.className.replace("no-js", "js");
    </script>
  </head>

  <body class="<%= current_user ? 'logged-in' : '' %> <%= controller.controller_name  + "-" +action_name %>">

    <div class="container">
      <% if content_for?(:content) -%>
        <%= yield(:content) -%>
      <% else -%>
        <%= yield %>
      <% end -%>
    </div>

  <%= javascript_include_tag "application"  %>

  <div id="anon-stats">
    <noscript>
      <img src="https://anon-stats.eff.org/js/?idsite=13&amp;rec=1&amp;action_name=<%= escape_page_title -%>" style="border:0" alt="" />
    </noscript>
    <script>
      document.getElementById('anon-stats').innerHTML = '<img src="https://anon-stats.eff.org/js/?idsite=13&amp;rec=1&amp;urlref='+encodeURIComponent(document.referrer)+'&amp;action_name=<%= escape_page_title -%>" style="border:0" alt="" />';
    </script>
  </div>
  <%= yield(:body) if content_for?(:body) -%>
  </body>
</html>
